package com.iweb.servlet;

import org.apache.log4j.Logger;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

public class SecondServlet extends HttpServlet {
    private final static Logger logger = Logger.getLogger(SecondServlet.class);
    public SecondServlet(){
        logger.debug("servlet初始化init()");


    }

    @Override
    public void init() throws ServletException {
        logger.debug("servlet初始化init()");
    }

    @Override
    protected void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
        logger.debug("调用servlet的service()");
    }

    @Override
    public void destroy() {
        logger.debug("调用用servlet的destroy()");
    }
}
